package com.yuwei.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.yuwei.database.entity.OrderEntity

@Dao
interface OrderDao {
    @Insert
    suspend fun insertOrder(orderEntity: OrderEntity)
    @Query("SELECT * FROM order_info")
    suspend fun getAll(): List<OrderEntity>
    @Query("SELECT * FROM order_info WHERE order_status = :status")
    suspend fun getByStatus(status: Int): List<OrderEntity>
    @Update
    suspend fun update(orderEntity: OrderEntity)
}